import React, { Component } from 'react';
import './GobackHeader.scss'
import { withRouter } from 'react-router-dom'
class Com extends Component {
	goback(){
		this.props.history.go(-1)
	}
	render(){
		return (
			<>
				<div className="user-header">
					<img onClick={()=>{this.goback()}} src="/images/user_ images/goback.png" alt=""/>
					<span className="title">
						{this.props.title}
					</span>
					{
						this.props.rightTitle ? 
						<span className='header-right-title'
							onClick={()=>{this.props.myClick()}}
						>
							{this.props.rightTitle}
						</span>
						:
						""
					}
				</div>
			</>
		)
	}
}
export default withRouter(Com)